export function getLocalStorage(name) {
  return JSON.parse(localStorage.getItem(name))
}

export function setLocalStorage(name, value) {
  return localStorage.setItem(name, JSON.stringify(value))
}

export function removeLocalStorage(name) {
  return localStorage.removeItem(name, { path: '' })
}
/**
 * 获取需要打开的对话索引值
 *
 * @returns
 */
export function getCacheIndexName() {
  let index_name = sessionStorage.getItem(KEY_INDEX_NAME)
  if (index_name) {
    sessionStorage.removeItem(KEY_INDEX_NAME)
  }

  return index_name
}
